﻿using System;
using BLL;

public partial class ANTProductAssemble_ViewAssemble_TSTestViewbySN : System.Web.UI.Page
{
    TSTest ams;
    TSTestItem amsi;

    public ANTProductAssemble_ViewAssemble_TSTestViewbySN()
    {
        ams = new TSTest();
        amsi = new TSTestItem();
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        string productSN = this.TextBox1.Text.Trim();
        this.GridView1.DataSource = ams.GetTSTestbySN(productSN);
        this.GridView1.DataBind();
        for (int i = 0; i < GridView1.Rows.Count; i++)
        {
            if (GridView1.Rows[i].Cells[4].Text == "Fail")
                GridView1.Rows[i].Cells[4].ForeColor = System.Drawing.Color.Red;
        }
        this.GridView2.DataSource = amsi.GetTSTestItembySN(productSN);
        this.GridView2.DataBind();
        for (int i = 0; i < GridView2.Rows.Count; i++)
        {
            if (GridView2.Rows[i].Cells[4].Text == "Fail")
                GridView2.Rows[i].Cells[4].ForeColor = System.Drawing.Color.Red;
        }
    }
}
